<?php
	
	if(isset($_SESSION['connect'])){
		
		$_VIEW = 'modules/user/views/myProfilView.php';
	
		$profile = fopen('./data/user/'.$_SESSION['connect'].'.txt', 'r');
		$password = fgets($profile);
		$password = rtrim($password);
		$password_crypt = '';
		$lenght = strlen($password);
	
		for($i = 0; $i < $lenght; $i++){
			$password_crypt =  $password_crypt . '*';
		}
	
		$mail = fgets($profile); 
		fclose($profile);
		
		if(isset($_POST['change'])){
			header('Location: index.php?page=user/change_profile');
		}
	}
	else{
		$_VIEW = 'modules/errors/views/error403View.php';
	}
?>